ul {
  list-style: none;
}
ul li {
  width: 300px;
  height: 30px;
  line-height: 30px;
  border: 1px solid #000;
}
ul li:nth-child(2n) {
  background: palevioletred;
}
ul li:nth-child(2n+1) {
  background: greenyellow;
}
ul li:hover {
  background: #ccc;
}
